from django.db import models
#会议
from department.models import Department
from user.models import User


class AddMeet(models.Model):

    meetname = models.CharField("会议名称", max_length=50,default=None,null=True)
    # bossname=models.ForeignKey(User)
    add_user = models.ForeignKey("user.User", null=True, blank=True, on_delete=models.SET_NULL, verbose_name="会议发布者",related_name="up_user")
    place = models.CharField("会议地点", max_length=100,default=None,null=True)
    date = models.CharField("会议日期", max_length=20,default=None,null=True)
    start_time = models.CharField("开始时间", max_length=20,default=None,null=True)
    finish_time = models.CharField("结束时间", max_length=20,default=None,null=True)
    time_state = models.CharField("会议状态",max_length=20,default=None,null=True)
    users = models.ManyToManyField(User,related_name="user_meets")
    departement =  models.ForeignKey(Department, null=True, blank=True, on_delete=models.SET_NULL, verbose_name="参会部门")
    # departments = models.ManyToManyField(Department)

